<include file="Public:header" />
<!--导入文章-->
<div class="dialog_content">
    <notempty name="programList">
        <form name="myform" action="" method="get" >
            <fieldset>
                <legend>发布方案列表</legend>
                    <table width="100%" class="table_form">
                        <tr>
                            <th>方案列表：</th>
                            <td>
                                <volist name="programList" id="vo">
                                    <label style="width:150px" class="ib"><input type="radio" value="{$vo.id}" id="_{$vo.id}" name="programid" <if condition="$vo['id'] eq $programid">checked</if>>{:getCateName($vo['catid'],$siteId)}</label>
                                    <span style="margin-right:10px;"><a href="{:U('Collection/importProgramDel',array('id'=>$vo['id']))}" style="color:#ccc">删除</a></span>
                                </volist>
                            </td>
                        </tr>
                        <tr>
                            <th>随机发布到其它栏目：</th>
                            <td><input type="checkbox" value="1" name="random" /></td>
                        </tr>
                        <tr>
                            <th>发布到所有站点：</th>
                            <td><input type="checkbox" value="1" name="randomsite"/></td>
                        </tr>
                        <tr>
                            <th>指定站点：</th>

                            <td>
                                <span id="sitename"></span>
                                <button class="J_showdialog" data-pic="0"  data-uri="{:U('Site/publicSelectSite', array('menuid'=>$menuid))}" data-acttype="ajax" data-title="选择站点" data-id="select" data-width="670" data-height="500" data-boxtype="radio" data-boxname="siteid" data-val="site_id" data-displaybox="sitename">选择站点</button>
                                <input type="hidden" name="siteid" id="site_id" value="">
                            </td>

                        </tr>
                        <tr>
                            <th>每天发布：</th>
                            <td><input type="text" name="sendnum" value="3" class="input-text" size="5" />篇</td>
                        </tr>
                        <tr>
                            <th>开始时间：</th>
                            <td>
                                <input type="radio" id="s1" value="1" name="stime" checked/><label for="s1">当前时间</label>
                                <input type="radio" id="s3" value="2" onclick="myCalendar('time_start');" name="stime"/><label  onclick="myCalendar('time_start');" for="s3">指定时间:
                                <input type="text" name="time_start" id="time_start" onclick="myCalendar();" readonly class="date" size="12" value="">
                            </label>
                            </td>

                        </tr>
                        <tr>
                            <th>
                                <input type="hidden" name="m" value="Admin">
                                <input type="hidden" name="c" value="Collection">
                                <input type="hidden" name="a" value="importContent">
                                <input type="hidden" name="nodeid" value="{$nodeid}">
                                <input type="hidden" name="type" value="{$type}">
                                <input type="hidden" name="ids" value="{$ids}">
                            </th>
                            <td>
                                <input type="submit" class="btn btn_submit" name="" value="提交"/>
                            </td>
                        </tr>
                    </table>
            </fieldset>

        </form>
    </notempty>

    <form id="info_form" action="{:U('Collection/importProgramAdd')}" method="post">
        <fieldset>
            <legend>新建发布发案</legend>
                <table width="100%" class="table_form">
                    <tr>
                        <td width="120">选择分类：</td>
                        <td>
                            <select class="J_cate_select mr10" data-pid="0" data-uri="{:U('ArticleCate/ajax_getchilds')}" data-selected=""></select>
                            <input type="hidden" name="cateid" id="J_cate_id" value="" />
                        </td>
                    </tr>
                    <tr>
                        <td>自动提取摘要：</td>
                        <td>
                            <label><input name="add_introduce" type="checkbox" checked  value="1">是否截取内容</label><input type="text" class="input-text" name="introcude_length" value="200" size="3">字符至内容摘要
                        </td>
                    </tr>
                    <tr>
                        <td>自动提取缩略图：</td>
                        <td>
                            <label><input type='checkbox' name='auto_thumb' checked value="1">是否获取内容第</label><input  type="text" name="auto_thumb_no" value="1" size="2" class="input-text">张图片作为标题图片
                        </td>
                    </tr>
                    <tr>
                        <td>导入文章状态：</td>
                        <td>
                            <input type="radio" value="1" checked="" id="_99" name="content_status">通过审核
                        </td>
                    </tr>
                </table>
                <input type="hidden" name="nodeid" value="{$nodeid}">
                <input type="hidden" name="type" value="{$type}">
                <input type="hidden" name="ids" value="{$ids}">

        </fieldset>
        <fieldset>
            <legend>标签与数据库对应关系</legend>
            <div class="table_list">
                <table width="100%" cellspacing="0">
                    <thead>
                    <tr>
                        <th align="left">原数据库字段</th>
                        <th align="left">数据库字段说明</th>
                        <th align="left">标签字段（采集填充结果）</th>
                        <th align="left">处理函数</th>
                    </tr>
                    </thead>
                    <tbody>
                    <volist name="model" id="vo">
                        <tr>
                            <td align="left">{$key}</td>
                            <td align="left">{$vo}</td>
                            <td align="left"><input type="hidden" name="model_field[]" value="{$key}">
                                <select name="node_field[]">
                                    <php>
                                        foreach($nodeField as $ks=>$no){
                                        </php>
                                    <option value="{$ks}" <if condition="$ks eq $key || ($key eq 'info' and $ks eq 'content')">selected="selected"</if>>{$no}</option>
                                    <php>
                                        }
                                    </php>

                                </select>
                            </td>
                            <td align="left"><input type="text" name="funcs[]"  value="trim" class="input-text" size="10"></td>

                        </tr>
                    </volist>

                    </tbody>
                </table>
                </div>
        </fieldset>

        <input type="submit" id="dosubmit"  class="btn btn_submit" value="提交" style="margin: 10px 0 10px 100px;;">
    </form>

</div>
<include file="Public:footer" />
<js file="__STATIC__/js/calendar/WdatePicker.js" charset="utf-8" />

<script>
$(function(){
    $('.J_cate_select').cate_select('请选择');
	$.formValidator.initConfig({formid:"info_form",autotip:true});
	$("#J_cate_id").formValidator({onshow:'请选择分类',onfocus:'请选择分类'}).regexValidator({regexp:"intege1",datatype:"enum",onerror:"请选择分类"});
});
</script>